
<template>
  <input type="text" @keydown.enter="onKeydown()" @keyup="onKeyUp()" v-model="city">
  <select v-model="city">
    <option value="BJ">北京</option>
    <option value="SH">上海</option>
    <option value="SZ">深圳</option>
    <option value="HZ">杭州</option>
  </select>
</template>

<script setup>
import { ref } from 'vue';

const city = ref('SH')
 const onKeydown = () => {
  console.log('onKeydown')
 }

 const onKeyUp = () => {
  console.log('onKeyUp')
 }
</script>

<style scoped>

</style>
  